package cn.xbtop.blog.config;

import cn.xbtop.blog.utils.IdWorker;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Mxb
 * @version 1.0
 * @date 2020/2/19 15:29
 */
@Configuration
public class BeanConfig {

    /**
     * 将bean注入容器  雪花算法
     * @return
     */
    @Bean
    public IdWorker idWorker() {
        return new IdWorker();
    }
}
